Skip to content

feat: Add Schema.from_{native,<backend>}#2957

Merged
dangotbanned merged 59 commits intomainfrom
schema-from
Aug 28, 2025
Merged

feat: Add Schema.from_{native,<backend>}#2957
dangotbanned merged 59 commits intomainfrom
schema-from

Conversation

@dangotbanned
Copy link
Copy Markdown
Member

@dangotbanned dangotbanned commented Aug 7, 2025

Will close #2100

What type of PR is this? (check all applicable)

  • 💾 Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 🔧 Optimization
  • 📝 Documentation
  • ✅ Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

See notes in (#2100 (comment)) for plan

@dangotbanned dangotbanned linked an issue Aug 7, 2025 that may be closed by this pull request
dangotbanned added a commit that referenced this pull request Aug 7, 2025
- Follow up to #2950
- Related #2957 (comment)

Expecting to cause some xpass on `modin` w/ `pandas<2`
Comment on lines +29 to +31
IntoArrowSchema: TypeAlias = "pa.Schema | Mapping[str, pa.DataType]"
IntoPolarsSchema: TypeAlias = "pl.Schema | Mapping[str, pl.DataType]"
IntoPandasSchema: TypeAlias = Mapping[str, pd.api.extensions.ExtensionDtype]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a better fit to name these From<backend>Schema

Copy link
Copy Markdown
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great feature, thanks!

@dangotbanned
Copy link
Copy Markdown
Member Author

Thanks for the review 😍

@dangotbanned dangotbanned merged commit d9bb2a0 into main Aug 28, 2025
30 of 32 checks passed
@dangotbanned dangotbanned deleted the schema-from branch August 28, 2025 14:57
dangotbanned added a commit that referenced this pull request Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enh: nw.Schema.from_native ?

2 participants